package com.hframe.typefilter;

/**
 * 字符口串转数字
 *
 * @author Administrator
 */
public class StringToLong implements FilterRef<Long, Object> {

    @Override
    public Long filter(Object object) throws Exception {
        return Long.parseLong((String) object);
    }

    public static Long parse(String object) {
        try {
            return Long.parseLong(object);
        } catch (Exception e) {
            return null;
        }
    }
}